#include "ClientSender.h"
#include "Util.h"
ClientSender::ClientSender(ClientInfo* info)
{
	cInfo = info;
}

ClientSender::~ClientSender(void)
{
}

void ClientSender::sendMessage(char* message) {

 //   // Send an initial buffer
	//int iResult;
	//iResult = send(cInfo->mSocket , message, (int)strlen(message), 0 );
 //   if (iResult == SOCKET_ERROR) {
	//	Util::log("Send fail");
 //       closesocket(cInfo->mSocket);
 //       WSACleanup();
 //       return;
 //   }
 //   return;		

	int lLength;
	lLength = send(cInfo->mSocket, message, strlen(message),0);
	if(lLength < strlen(message))
	{
	   Util::log("Send Error.\n");
	}
	//closesocket(lhSocket);
	return;
}